package com.edocbase.desktop.plugins.driver.mail;

import com.edocbase.desktop.lightweight.widgets.FigureOwner;
import com.edocbase.desktop.lightweight.widgets.IPopupContent;
import com.edocbase.desktop.lightweight.widgets.IPopupItem;
import com.edocbase.desktop.lightweight.widgets.IPopupMenuListener;

public class MailAccountPopupListener implements IPopupMenuListener {

	@Override
	public void shown(IPopupContent popupContent) {
		IPopupItem item = popupContent.getItem(MailAccountPopupItem.MAIL_ACCOUNT_POPUP_ITEM);
		if(item !=null){
			if (item instanceof FigureOwner){
				((FigureOwner)item).setOwner(popupContent.getOwner());
			}
			item.show();
		}
	}

}
